<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        // 后置运算符
        var num = 10;
        // ++num;
        num++;
        ++num; // 单独使用，不受任何影响
        num++; // num = num +1
        console.log(num);
        console.log('---------------------');
        var age = 10;
        console.log(age++ + 10);  // 20  // age++ 先返回，后+1；
        //            10  + 10 = 20
        // age = age + 1;
        console.log(age); //11
    </script>
</head>

<body>

</body>

</html>